package ext.opensource.netty.server.example.simple;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class BizDispatchCollect {
	private static Map<String, Object> coursesTable = new ConcurrentHashMap<>();

	public static void setCourses(final Map<String, Object> courseMap) {
		BizDispatchCollect.coursesTable.clear();
		if (courseMap != null && courseMap.size() > 0) {
			for (final Map.Entry<String, Object> entry : courseMap.entrySet()) {
				BizDispatchCollect.coursesTable.put(entry.getKey(), entry.getValue());
			}
		}
	}

	public static Object getBizDispatchObject(final String code) {
		return BizDispatchCollect.coursesTable.get(code);
	}

	public static void processMesage(final String code, final String dataContent) {
		//
	}

}
